<?

@include_once("services/cropImage.php");

if (isset($_POST["upload_thumbnail"])) {
	//Get the new coordinates to crop the image.
	$x1 = $_POST["x1"];
	$y1 = $_POST["y1"];
	$w = $_POST["w"];
	$h = $_POST["h"];
	$large_image_location = $_POST["large_image_location"];
	$filename = $_POST["filename"];
	
	$thumb_image_location = $targetLocationFullFrame . "/" . $filename;
	resizeThumbnailImage($thumb_image_location, $large_image_location,$w,$h,$x1,$y1,$thumb_width,$thumb_height);
	
	$thumb_S_image_location = $targetLocationSmallDisplay . "/" . $filename;
	resizeThumbnailImage($thumb_S_image_location, $large_image_location,$w,$h,$x1,$y1,$thumb_width_small,$thumb_height_small);
	
	
}